package com.hopu.pyq.service.impl;

import com.hopu.pyq.dao.ZanDAO;
import com.hopu.pyq.entity.Zan;
import com.hopu.pyq.service.ZanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ZanServiceImpl implements ZanService {

    @Autowired
    private ZanDAO zanDAO;

    @Override
    public Zan findZanByUserIdAndPyqId(Integer userId, Integer pyqId) {
        return zanDAO.selectZanByUserIdAndPyqId(userId,pyqId);
    }

    @Override
    public void addZan(Zan zan) {
        zanDAO.insertZan(zan);
    }
}
